package ZY11_12;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

// 输入一个文件名，输出其中的byte内容
public class Test3 {
    public static void main(String[] args) {
        FileInputStream f=null;
        try {
            f=new FileInputStream("C:\\Users\\Administrator\\Desktop\\课件\\之前作业\\OOPZY\\ZY10_20\\GongSI.java");
            byte[]b=new byte[f.available()];
            int len=0;
            len=f.read(b);
            System.out.println(new String(b,0,len));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
